package pl.com.like.sequoia.biojava.genbank.impl;

import java.util.List;

import org.biojava.bio.BioException;
import org.biojava.bio.seq.db.IllegalIDException;
import org.biojavax.bio.db.ncbi.GenbankRichSequenceDB;
import org.biojavax.bio.seq.RichSequence;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import pl.com.like.sequoia.biojava.genbank.IGenbankService;
import pl.com.like.sequoia.biojava.util.impl.ConnectService;
import pl.com.like.sequoia.exceptions.LogicalException;
import pl.com.like.sequoia.model.bio.BioObjectHandler;
import pl.com.like.sequoia.model.bio.enums.FileTypeEnum;

/**
 * Class handling all communication with Genbank & PDB
 * 
 * @author Pawel Wolanski
 * 
 */
@Deprecated
public class GenbankService extends ConnectService implements IGenbankService {

	private final FileTypeEnum type = FileTypeEnum.GENBANK;

	private static final Logger log = LoggerFactory.getLogger(GenbankService.class);

	@Override
	public void completeOptionals(BioObjectHandler bio) {
		// TODO Auto-generated method stub
		throw new UnsupportedOperationException("Method 'completeOptionals' is not implemented!");
	}

	/** {@inheritDoc} */
	@Deprecated
	public RichSequence getInfo(String giNumber, FileTypeEnum type) throws IllegalIDException, BioException {
		GenbankRichSequenceDB grsdb = new GenbankRichSequenceDB();
		return grsdb.getRichSequence(giNumber);
	}

	/**
	 * {@inheritDoc}
	 */
	public BioObjectHandler getObject(String idObject) throws LogicalException {
		return getConnectionHelper().getObject(idObject, getType());
	}

	@Override
	public FileTypeEnum getType() {
		return type;
	}

	public List<BioObjectHandler> getSearchList(String idObject, Integer size, Boolean extendedSearch) {
		// TODO Auto-generated method stub
		throw new UnsupportedOperationException("Method 'getSearchList' is not implemented!");
	}
}
